public class Test1 {
    public static void main(String[] args) {
        Worker worker = new Worker("worker1");
        Worker worker1 = new Worker("worker1");
        worker.equals(worker1);
        worker.setAge(1);
        System.out.println(worker.getAge());
        worker.print();
        Worker2 worker2 = new Worker2("worker1");
//        worker2.setAge(2);
        System.out.println(worker2.getAge());
        worker2.print();
        worker.equals(worker2);
        String a1 = new String("a1");
        String a2 = new String("a1");
        a1.equals(a2);
    }
}
